﻿@using Microsoft.AspNet.Identity
@if (Request.IsAuthenticated)
{

 @*   <h4 id="authtag">You are currently authenticated as @Session["AuthUserFullName"]</h4>*@
    using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
    {
    @Html.AntiForgeryToken()

    <ul id="mainnav">
        
        @if (User.Identity.Name.Contains('@')) {
        <li>
            <a href="@Url.Action("ChangePassword", "Manage")" title="Manage Your Account.">Hello @Session["AuthUserFullName"]!<br />Your Account</a>
        </li>
        }
        else { 
        <li>
            <a href="@Url.Action("ChangePassword", "Manage")" title="Manage Your Account.">Hello @Session["AuthUserFullName"]!<br />Your Account</a>
        </li>
        }

        @*<li>@Html.ActionLink("Log Out", "LoginNR", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>*@

        <li><a id="loginLink" href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>

        @*<li><a href="javascript:if ('@User.Identity.Name'.indexOf('.')==-1) {alert('You can log off by closing your browser. On an RVA computer, you will always automatically be logged in as your network user.') } else document.getElementById('logoutForm').submit()">Log off</a></li>*@

    </ul>
    }
}
else
{
    <ul id="mainnav">
        <li>@Html.ActionLink("Log in", "LoginNR", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
    </ul>
}
<script>
    $("#mainnav").kendoMenu({
        
    });
</script>